68
|
I have a hierarchy and I need to filter only root items that match, with thier childs

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.LinesAtRoot = -1
.FilterInclude = 3
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 240
.Filter = "R1"
End With
With .Items
h = .AddItem("R1")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
.ExpandItem(h) = True
h = .AddItem("R2")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
End With
.ApplyFilter
End With
End Function
</SCRIPT>
</BODY>
|
66
|
I have a hierarchy and I need to filter only parent items that match, including thier childs

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.LinesAtRoot = -1
.FilterInclude = 1
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 240
.Filter = "R1"
End With
With .Items
h = .AddItem("R1")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
.ExpandItem(h) = True
h = .AddItem("R2")
.InsertItem h,,"C1"
.InsertItem h,,"C2"
End With
.ApplyFilter
End With
End Function
</SCRIPT>
</BODY>
|
558
|
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.AttachTemplate "handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}"
.HeaderAppearance = 4
.DrawGridLines = -1
.GridLineStyle = 32
With .Columns
.Add "Item"
With .Add("Pos")
.Position = 0
.Width = 32
.AllowSizing = False
.FormatColumn = "1 index ``"
End With
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
472
|
I cannot seem to get autosearch=1 (contains) in the column object to search properly. It still only finds items that start with the typed character. I want to it look to see if the typed character(s) are contained in the item. I Can't seem to get this to work

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Style = 2
.HeaderVisible = False
.AutoSearch = True
.AutoDropDown = True
.IntegralHeight = True
.Columns.Add("Default").AutoSearch = 1
With .Items
.AddItem "This is a bit of text"
.AddItem "This is a another text"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
94
|
I can't scroll to the end of the data. What can I do

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ScrollBySingleLine = True
.DrawGridLines = -2
.Columns.Add "Column"
With .Items
.ItemHeight(.AddItem(0)) = 13
End With
.PutItems .GetItems(0)
With .Items
.ItemHeight(.AddItem(1)) = 26
End With
.PutItems .GetItems(0)
With .Items
.ItemHeight(.AddItem(2)) = 36
End With
.PutItems .GetItems(0)
With .Items
.ItemHeight(.AddItem(3)) = 48
End With
.PutItems .GetItems(0)
End With
End Function
</SCRIPT>
</BODY>
|
469
|
I am using the ScrollWidth/ScrollHeight property on 0 to hide the control's scroll bars, the question is that the drop down button is disappearing. What can be done so I can still show the drop down button

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.LabelHeight = 40
.ScrollWidth = 0
.ScrollHeight = 0
.DropDownButtonWidth = 40
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
514
|
I am using filter prompt feature, and also column's filter, just wondering if possible to compact displaying the filter bar so it won't show on multiple lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<r><i><fgcolor=808080><upline><solidline><sha ;;0>` + value"
.FilterBarPromptPattern = "B"
.FilterBarPromptVisible = 2067 ' FilterBarVisibleEnum.exFilterBarCompact Or FilterBarVisibleEnum.exFilterBarSingleLine Or FilterBarVisibleEnum.exFilterBarVisible Or FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = 240
.Filter = "Item A|Item B"
End With
.ApplyFilter
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
550
|
I am calling Value to change the selected value, but the selection is not visible, unless I scroll to it

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.ColumnAutoResize = False
Set rs = CreateObject("ADODB.Recordset")
With rs
.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.accdb",1,1
End With
.DataSource = rs
.Value = 10311
With .Items
.EnsureVisibleItem .FocusItem
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
146
|
I've seen that you can change the visual appearance for the scroll bar. How can I do that

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
.VisualAppearance.Add 2,"c:\exontrol\images\pushed.ebn"
.VisualAppearance.Add 3,"c:\exontrol\images\hot.ebn"
.Background(324) = &H1000000
.Background(325) = &H2000000
.Background(327) = &H3000000
.Background(404) = RGB(240,240,240)
.Background(276) = RGB(240,240,240)
.Background(511) = RGB(240,240,240) ' BackgroundPartEnum.exScrollHoverAll Or BackgroundPartEnum.exDateScrollThumb
.Columns.Add("S").Width = 32
.Columns.Add("Level 1").LevelKey = 1
.Columns.Add("Level 2").LevelKey = 1
.Columns.Add("Level 3").LevelKey = 1
.Columns.Add("E1").Width = 32
.Columns.Add("E2").Width = 32
.Columns.Add("E3").Width = 32
.Columns.Add("E4").Width = 32
.ColumnAutoResize = False
End With
End Function
</SCRIPT>
</BODY>
|
119
|
I've seen that the width of the tooltip is variable. Can I make it larger

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ToolTipWidth = 328
.Columns.Add("tootip").ToolTip = "this is a tooltip that should be very very very very very very very long"
End With
End Function
</SCRIPT>
</BODY>
|
2
|
I've added a single column, but it is displayed only on a part of the control. Is there something I can do so the column will be fully displayed on the control

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "ColumnName"
.Items.AddItem "Item 1"
.Items.AddItem "Item 2"
End With
End Function
</SCRIPT>
</BODY>
|
473
|
How would you clear the displayed selection for style DropDownList. So if a user selects or searches a value in a style DropDownList, I want to know if I can reset the control back to an empty selection

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function ComboBox1_DropUp()
With ComboBox1
.Value = ""
End With
End Function
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
Function ComboBox1_SelectionChanged()
With ComboBox1
alert( "You selected: " )
alert( .Value )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Style = 2
.HeaderVisible = False
.AutoSearch = True
.AutoDropDown = True
.IntegralHeight = True
.Columns.Add("Default").AutoSearch = 1
With .Items
.AddItem "This is a bit of text"
.AddItem "This is a another text"
.DefaultItem = .InsertItem(,,"")
.ItemPosition(0) = 0
.SortableItem(0) = False
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
560
|
How I can programmatically select a row (with regular combobox I can set the ListIndex right up to Listcount -1)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Columns.Add "Column"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.SelectItem(.ItemByIndex(1)) = True
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
561
|
How I can programmatically select a row (method 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Columns.Add "Column"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
End With
.Value = "Item 2"
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
88
|
How do lock / fix some columns to the control, so I can see them all the time, event if I scroll the columns

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.CountLockedColumns = 1
.BackColorLock = RGB(240,240,240)
.ColumnAutoResize = False
.Columns.Add("Locked").Width = 128
.Columns.Add("Un-Locked 1").Width = 128
.Columns.Add("Un-Locked 2").Width = 128
.Columns.Add("Un-Locked 3").Width = 128
With .Items
.CellCaption(.AddItem("locked"),1) = "unlocked"
End With
End With
End Function
</SCRIPT>
</BODY>
|
299
|
How do I vertically align a cell

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.DrawGridLines = -2
.Columns.Add("MultipleLine").Def(16) = False
.Columns.Add "VAlign"
With .Items
h = .AddItem("This is a bit of long text that should break the line")
.CellCaption(h,1) = "top"
.CellVAlignment(h,1) = 0
h = .AddItem("This is a bit of long text that should break the line")
.CellCaption(h,1) = "middle"
.CellVAlignment(h,1) = 1
h = .AddItem("This is a bit of long text that should break the line")
.CellCaption(h,1) = "bottom"
.CellVAlignment(h,1) = 2
End With
End With
End Function
</SCRIPT>
</BODY>
|
84
|
How do I use my own icons for my radio buttons

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.RadioImage(0) = 1
.RadioImage(1) = 2
.Columns.Add("Radio").Def(1) = True
With .Items
.AddItem "Radio 1"
.CellState(.AddItem("Radio 2"),0) = 1
.AddItem "Radio 3"
End With
End With
End Function
</SCRIPT>
</BODY>
|
83
|
How do I use my own icons for checkbox cells

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.CheckImage(0) = 1
.CheckImage(1) = 2
.Columns.Add("Check").Def(0) = True
With .Items
.AddItem "Check 1"
.CellState(.AddItem("Check 2"),0) = 1
End With
End With
End Function
</SCRIPT>
</BODY>
|
479
|
How do I unselect/deselect the item (Simple style)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Style = 0
.Columns.Add "Def"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 3"
End With
.SearchColumnIndex = 0
.Value = "Item 2"
With .Items
.SelectItem(.FocusItem) = False
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
478
|
How do I unselect/deselect the item (DropDownList style)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Style = 1
.Columns.Add "Def"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 3"
End With
.SearchColumnIndex = 0
.Value = "Item 2"
With .Items
.SelectItem(.FocusItem) = False
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
477
|
How do I unselect/deselect the item (DropDown style)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Style = 1
.Columns.Add "Def"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 3"
End With
.SearchColumnIndex = 0
.Value = "Item 2"
With .Items
.SelectItem(.FocusItem) = False
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
288
|
How do I unselect an item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.SelectItem(h) = False
End With
End With
End Function
</SCRIPT>
</BODY>
|
155
|
How do I underline the numbers greater than a value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ConditionalFormats.Add("%0 >= 10").Underline = True
.Columns.Add "Numbers"
.Items.AddItem 1
.Items.AddItem 2
.Items.AddItem 10
.Items.AddItem 20
End With
End Function
</SCRIPT>
</BODY>
|
244
|
How do I underline an item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
.ItemUnderline(.AddItem("underline")) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
245
|
How do I underline a cell or an item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
.CellCaptionFormat(.AddItem("gets <u>underline</u> only a portion of text"),0) = 1
End With
End With
End Function
</SCRIPT>
</BODY>
|
246
|
How do I underline a cell

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
.CellUnderline(.AddItem("underline"),0) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
325
|
How do I turn off the auto complete feature

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.AutoComplete = False
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
328
|
How do I specify the width of the drop down window

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.WidthList() = 100
.AllowSizeGrip = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
327
|
How do I specify the minimum width of the drop down window

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.MinWidthList = 100
.AllowSizeGrip = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
329
|
How do I specify the minimum height of the drop down window

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.MinHeightList = 100
.AllowSizeGrip = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
92
|
How do I specify the indentation of the child items relative to their parents

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.LinesAtRoot = 1
.Indent = 11
.Columns.Add "Column"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
h = .AddItem("Root 2")
.InsertItem h,,"Child"
End With
End With
End Function
</SCRIPT>
</BODY>
|
330
|
How do I specify the height of the drop down window

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.HeightList() = 400
.MinWidthList = 100
.AllowSizeGrip = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
338
|
How do I specify the height of the control's label

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.LabelHeight = 34
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
93
|
How do I specify the column where the tree lines / hierarchy are shown

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.LinesAtRoot = 1
.TreeColumnIndex = 1
.Columns.Add "Column 1"
.Columns.Add "Column 2"
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
483
|
How do I sort the index column as numeric

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function ComboBox1_InsertItem(Item)
With ComboBox1
With .Items
.CellData(Item,1) = .ItemToIndex(Item)
End With
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.DrawGridLines = -1
.ColumnAutoResize = True
.ShowFocusRect = False
.SingleEdit = True
With .Columns.Add("Next")
.Def(48) = 4
.Def(52) = 4
End With
With .Columns.Add("Index")
.AllowSizing = False
.Width = 48
.FormatColumn = "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
.Def(17) = 1
.SortType = 5
.Position = 0
End With
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.AddItem "Item 5"
.AddItem "Item 6"
.AddItem "Item 7"
.AddItem "Item 8"
.AddItem "Item 9"
.AddItem "Item 10"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
229
|
How do I sort the child items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.SortChildren h,0,False
End With
End With
End Function
</SCRIPT>
</BODY>
|
79
|
How do I sort descending a column, and put the sorting icon in the column's header

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Column"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
End With
.Columns.Item(0).SortOrder = 2
End With
End Function
</SCRIPT>
</BODY>
|
78
|
How do I sort ascending a column, and put the sorting icon in the column's header

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
.Columns.Item(0).SortOrder = 1
End With
End Function
</SCRIPT>
</BODY>
|
72
|
How do I sort a column by numbers

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add("desc").SortType = 1
With .Items
.AddItem 1
.AddItem 5
.AddItem 10
.SortChildren 0,0,False
End With
End With
End Function
</SCRIPT>
</BODY>
|
116
|
How do I show the tooltip quicker

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ToolTipDelay = 1
.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
End With
End Function
</SCRIPT>
</BODY>
|
181
|
How do I show or hide the sorting icons, but still need sorting

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add("Sorted").SortOrder = 1
.Columns.Item(0).DisplaySortIcon = False
End With
End Function
</SCRIPT>
</BODY>
|
194
|
How do I show buttons for all cells in the column

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
With .Columns.Add("Button")
.Def(2) = True
.Def(3) = True
End With
.Items.AddItem " Button 1 "
.Items.AddItem " Button 2 "
End With
End Function
</SCRIPT>
</BODY>
|
193
|
How do I show buttons for all cells in the column

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add("Button").Def(2) = True
.Items.AddItem 0
.Items.AddItem 1
End With
End Function
</SCRIPT>
</BODY>
|
109
|
How do I show alternate rows in different background color

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BackColorAlternate = RGB(240,240,240)
.Columns.Add "Column"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.AddItem "Item 5"
End With
End With
End Function
</SCRIPT>
</BODY>
|
559
|
How do I set an extra data for each item
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function ComboBox1_MouseMove(Button, Shift, X, Y)
With ComboBox1
i = .ItemFromPoint(-1,-1,c,hit)
alert( i )
alert( .Items.ItemData(i) )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Columns.Add "Default"
With .Items
.ItemData(.AddItem("method 1")) = "your extra data of method 1"
.InsertItem 0,"your extra data of method 2","method 2"
End With
With .Items
.DefaultItem = .AddItem("method 3")
.ItemData(0) = "your extra data of method 3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
286
|
How do I select an item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.SelectItem(h) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
347
|
How do I select a value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.IntegralHeight = True
.LinesAtRoot = 1
.TreeColumnIndex = 1
.Columns.Add "Column 1"
.Columns.Add "Column 2"
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
End With
.Select(1) = "Root 1.2"
End With
End Function
</SCRIPT>
</BODY>
|
348
|
How do I select a value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.IntegralHeight = True
.LinesAtRoot = 1
.TreeColumnIndex = 1
.Columns.Add "Column 1"
.Columns.Add "Column 2"
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
End With
.Value = "Root 1.1"
End With
End Function
</SCRIPT>
</BODY>
|
466
|
How do I select a NULL/empty value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Style = 2
.Columns.Add "Items"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.DefaultItem = .InsertItem(,,"")
.ItemPosition(0) = 0
.SortableItem(0) = False
End With
.Value = ""
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
114
|
How do I search case sensitive, using your incremental search feature

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.AutoSearch = True
.ASCIILower = ""
With .Columns
.Add("exStartWith").AutoSearch = 0
.Add("exContains").AutoSearch = 1
End With
With .Items
.CellCaption(.AddItem("text"),1) = "another text"
End With
With .Items
.CellCaption(.AddItem("text"),1) = "another text"
End With
End With
End Function
</SCRIPT>
</BODY>
|
262
|
How do I retrieve the focused item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.FocusItem) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
345
|
How do I remove the drop down's border

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.DropDownBorder = 0
End With
End Function
</SCRIPT>
</BODY>
|
69
|
How do I remove the control's border

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Appearance = 0
End With
End Function
</SCRIPT>
</BODY>
|
451
|
How do I prevent scrolling the control's data after user does the sort

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.EnsureOnSort = False
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
.PutItems .GetItems(0)
.PutItems .GetItems(0)
.PutItems .GetItems(0)
.Columns.Item(0).SortOrder = 1
End With
End Function
</SCRIPT>
</BODY>
|
585
|
How do I prevent changing the cell's state ( check-box state )
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function ComboBox1_CellStateChanging(Cell, NewState)
With ComboBox1
With .Items
NewState = .CellState(,Cell)
End With
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.LinesAtRoot = -1
With .Columns.Add("P1")
.Def(0) = True
.PartialCheck = True
End With
With .Columns.Add("P2")
.Def(0) = True
.PartialCheck = True
End With
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
77
|
How do I perform my own/custom sort, using my extra strings

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add("desc").SortType = 5
With .Items
.CellData(.AddItem("A"),0) = "C"
.CellData(.AddItem("B"),0) = "B"
.CellData(.AddItem("C"),0) = "A"
.SortChildren 0,0,False
End With
End With
End Function
</SCRIPT>
</BODY>
|
76
|
How do I perform my own/custom sort, using my extra numbers

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add("desc").SortType = 5
With .Items
.CellData(.AddItem(0),0) = 2
.CellData(.AddItem(1),0) = 1
.CellData(.AddItem(2),0) = 0
.SortChildren 0,0,False
End With
End With
End Function
</SCRIPT>
</BODY>
|
82
|
How do I perform my own sorting when user clicks the column's header

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.SortOnClick = 1
.Columns.Add "Column"
.Items.AddItem "Item 1"
.Items.AddItem "Item 2"
End With
End Function
</SCRIPT>
</BODY>
|
334
|
How do I lock or make read-only the control

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Locked = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
331
|
How do I let user to resize the drop down window, at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.AllowSizeGrip = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
332
|
How do I let user to resize only the width of the drop down window, at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.AllowSizeGrip = True
.AllowVResize = False
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
333
|
How do I let user to resize only the height of the drop down window, at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.AllowSizeGrip = True
.AllowHResize = False
.MinWidthList = 100
.MinHeightList = 100
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
117
|
How do I let the tooltip being displayed longer

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ToolTipPopDelay = 10000
.Columns.Add("tootip").ToolTip = "this is a tooltip assigned to a column"
End With
End Function
</SCRIPT>
</BODY>
|
153
|
How do I highlight in italic the numbers greater than a value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ConditionalFormats.Add("%0 >= 10").Italic = True
.Columns.Add "Numbers"
.Items.AddItem 1
.Items.AddItem 2
.Items.AddItem 10
.Items.AddItem 20
End With
End Function
</SCRIPT>
</BODY>
|
154
|
How do I highlight in italic the numbers greater than a value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ConditionalFormats.Add("%0 >= 10").StrikeOut = True
.Columns.Add "Numbers"
.Items.AddItem 1
.Items.AddItem 2
.Items.AddItem 10
.Items.AddItem 20
End With
End Function
</SCRIPT>
</BODY>
|
152
|
How do I highlight in bold the numbers greater than a value

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ConditionalFormats.Add("%0 >= 10").Bold = True
.Columns.Add "Numbers"
.Items.AddItem 1
.Items.AddItem 2
.Items.AddItem 10
.Items.AddItem 20
End With
End Function
</SCRIPT>
</BODY>
|
71
|
How do I hide the control's header bar

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.HeaderVisible = False
End With
End Function
</SCRIPT>
</BODY>
|
258
|
How do I get the parent item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.ItemParent(.ItemChild(h))) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
232
|
How do I get the number or count of items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
End With
With .Items
.AddItem .ItemCount
End With
End With
End Function
</SCRIPT>
</BODY>
|
261
|
How do I get the number or count of child items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.AddItem .ChildCount(h)
End With
End With
End Function
</SCRIPT>
</BODY>
|
339
|
How do I get the handle of the drop down window

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add ComboBox1.hWndDropDown
End With
End Function
</SCRIPT>
</BODY>
|
263
|
How do I get the handle of the cell

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.CellBold(,.ItemCell(h,0)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
257
|
How do I get the first child item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.ItemChild(h)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
486
|
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
With .Columns.Add("Date")
.SortType = 2
.DisplayFilterButton = True
.DisplayFilterPattern = False
.DisplayFilterDate = True
.FilterList = 1296 ' FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsDesc
End With
With .Columns.Add("DateTime")
.SortType = 3
.DisplayFilterButton = True
.DisplayFilterPattern = False
.FilterList = 1296 ' FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsDesc
End With
With .Columns.Add("Time")
.SortType = 4
.DisplayFilterButton = True
.DisplayFilterPattern = False
.FilterList = 1296 ' FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsDesc
.FormatColumn = "time(value)"
End With
With .Columns.Add("Numeric")
.SortType = 1
.DisplayFilterButton = True
.FilterList = 1296 ' FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsDesc
End With
With .Columns.Add("String")
.DisplayFilterButton = True
.FilterList = 1296 ' FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsDesc
End With
With .Items
h = .AddItem(#1/27/2010#)
.CellCaption(h,1) = #1/27/2010 10:00:00 AM#
.CellCaption(h,2) = .CellCaption(h,1)
.CellCaption(h,3) = 1
.CellCaption(h,4) = .CellCaption(h,3)
h = .AddItem(#1/27/2011#)
.CellCaption(h,1) = #1/27/2011 9:00:00 AM#
.CellCaption(h,2) = .CellCaption(h,1)
.CellCaption(h,3) = 11
.CellCaption(h,4) = .CellCaption(h,3)
h = .AddItem(#11/2/2010#)
.CellCaption(h,1) = #11/2/2010 9:00:00 AM#
.CellCaption(h,2) = .CellCaption(h,1)
.CellCaption(h,3) = 2
.CellCaption(h,4) = .CellCaption(h,3)
End With
.Columns.Item("DateTime").DisplayFilterDate = False
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
96
|
How do I get ride of the rectangle arround focused item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ShowFocusRect = False
.Columns.Add "Column"
.Items.AddItem 0
.Items.AddItem 1
End With
End Function
</SCRIPT>
</BODY>
|
470
|
How do I get notified once the user changes the Filter For field
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function ComboBox1_EditChange(ColIndex)
With ComboBox1
alert( "ColIndex: " )
alert( ColIndex )
alert( "Label: " )
alert( .EditText(0) )
alert( "FilterFor: " )
alert( .EditText(-1) )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.FilterForVisible = True
.FilterForBackColor = RGB(240,240,240)
.IntegralHeight = True
.Columns.Add "Default"
With .Items
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
.AddItem "Item 5"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
547
|
How do I get a list of interfaces the object implemenets

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.ColumnAutoResize = False
With CreateObject("DAO.DBEngine.120")
Set rs = .OpenDatabase("C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.accdb").OpenRecordset("Orders")
End With
alert( CreateObject("Exontrol.PropertiesList").Interfaces(rs).Interfaces(rs) )
.DataSource = rs
.Value = 10248
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
287
|
How do I find the selected item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.SelectItem(h) = True
.ItemBold(.SelectedItem(0)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
294
|
How do I find the index of the item based on its handle

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.ItemByIndex(.ItemToIndex(h))) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
293
|
How do I find the handle of the item based on its index

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.ItemByIndex(1)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
297
|
How do I find an item based on a path

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.ItemData(.InsertItem(h,,"Child 2")) = 1234
.ExpandItem(h) = True
.ItemBold(.FindPath("Root 1\Child 1")) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
296
|
How do I find an item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
.ItemBold(.FindItem("Child 2",0)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
107
|
How do I filter programatically the control

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 3
.Filter = "Item*"
End With
.Items.AddItem "Item 1"
.Items.AddItem ""
.Items.AddItem "Item 2"
.ApplyFilter
End With
End Function
</SCRIPT>
</BODY>
|
63
|
How do I filter for items that match exactly the specified string

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 240
.Filter = "Item 1"
End With
.Items.AddItem "Item 1"
.Items.AddItem "Item 2"
.Items.AddItem "Item 3"
.ApplyFilter
End With
End Function
</SCRIPT>
</BODY>
|
234
|
How do I expand or collapse an item

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
123
|
How do I expand automatically the items while user types characters to searching for something ( incremental searching )

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ExpandOnSearch = True
.LinesAtRoot = -1
.AutoSearch = True
.Columns.Add("Column").AutoSearch = 1
With .Items
.InsertItem .InsertItem(.AddItem("text"),,"some text"),,"another text"
.InsertItem .InsertItem(.AddItem("text"),,"some text"),,"another text"
End With
End With
End Function
</SCRIPT>
</BODY>
|
260
|
How do I enumerate the visible items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
h = .AddItem("Root 2")
.ItemBold(.FirstVisibleItem) = True
.ItemBold(.NextVisibleItem(.FirstVisibleItem)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
259
|
How do I enumerate the siblings items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
h = .AddItem("Root 2")
.ItemBold(.NextSiblingItem(.FirstVisibleItem)) = True
.ItemBold(.PrevSiblingItem(.NextSiblingItem(.FirstVisibleItem))) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
256
|
How do I enumerate the root items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "Default"
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
h = .AddItem("Root 2")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ItemBold(.RootItem(0)) = True
.ItemUnderline(.RootItem(1)) = True
End With
End With
End Function
</SCRIPT>
</BODY>
|
40
|
How do I ensure that the focused item is visible, after the user does the sort

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.EnsureOnSort = True
.Columns.Add "Column"
With .Items
.AddItem "Item 3"
.AddItem "Item 1"
.AddItem "Item 2"
End With
.PutItems .GetItems(0)
.PutItems .GetItems(0)
.PutItems .GetItems(0)
.Columns.Item(0).SortOrder = 1
End With
End Function
</SCRIPT>
</BODY>
|
108
|
How do I enlarge the drop down filter window

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.FilterBarDropDownHeight = "-320"
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterBarDropDownWidth = "-320"
End With
.Items.AddItem "Item 1"
.Items.AddItem "Item 2"
End With
End Function
</SCRIPT>
</BODY>
|
165
|
How do I enlarge or change the size of the control's scrollbars

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ScrollHeight = 18
.ScrollWidth = 18
.ScrollButtonWidth = 18
.ScrollButtonHeight = 18
End With
End Function
</SCRIPT>
</BODY>
|
112
|
How do I enable the incremental search feature within a column

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.AutoSearch = True
With .Columns
.Add("exStartWith").AutoSearch = 0
.Add("exContains").AutoSearch = 1
End With
With .Items
.CellCaption(.AddItem("text"),1) = "another text"
End With
With .Items
.CellCaption(.AddItem("text"),1) = "another text"
End With
End With
End Function
</SCRIPT>
</BODY>
|
138
|
How do I enable resizing the columns at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ColumnsAllowSizing = True
.MarkSearchColumn = False
.HeaderVisible = False
.Columns.Add "Column 1"
.Columns.Add "Column 2"
.DrawGridLines = 2
With .Items
.CellCaption(.AddItem("Item 1"),1) = "Sub Item 1"
End With
With .Items
.CellCaption(.AddItem("Item 2"),1) = "Sub Item 2"
End With
End With
End Function
</SCRIPT>
</BODY>
|
351
|
How do I enable resizing all the items at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ItemsAllowSizing = 1
.DrawGridLines = 1
.Columns.Add "Column"
.Items.AddItem "Item 1"
With .Items
.ItemHeight(.AddItem("Item 2")) = 48
End With
.Items.AddItem "Item 3"
End With
End Function
</SCRIPT>
</BODY>
|
137
|
How do I enable resizing ( changing the height ) the items at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.ItemsAllowSizing = True
.ScrollBySingleLine = True
.Columns.Add "Column"
.Items.AddItem "Item 1"
With .Items
.ItemHeight(.AddItem("Item 2")) = 48
End With
.Items.AddItem "Item 3"
End With
End Function
</SCRIPT>
</BODY>
|
180
|
How do I enable or disable the entire column

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "C1"
.Columns.Add("Disabled").Enabled = False
With .Items
.CellCaption(.AddItem(0),1) = "0.1"
End With
With .Items
.CellCaption(.AddItem(1),1) = "1.1"
End With
End With
End Function
</SCRIPT>
</BODY>
|
268
|
How do I enable or disable a cell

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Columns.Add "C1"
.Columns.Add "C2"
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "Cell 2"
.CellEnabled(h,1) = False
End With
End With
End Function
</SCRIPT>
</BODY>
|
553
|
How do I display the position of the item with 0-padding

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.BeginUpdate
.Columns.Add("Items").FormatColumn = "((1 apos ``) lpad `00`) + `. ` + value"
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
.AddItem "Item D"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
349
|
How do I display the icons being selected in the control's label

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CF170E7A-4391-44BD-8D93-29F8D2801EF7" id="ComboBox1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With ComboBox1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.Columns.Add "Column"
With .Items
.CellImage(.AddItem("Image 1"),0) = 1
.CellImage(.AddItem("Image 2"),0) = 2
.CellImage(.AddItem("Image 3"),0) = 3
End With
.AssignEditImageOnSelect(0) = True
.Value = "Image 2"
End With
End Function
</SCRIPT>
</BODY>
|